<!DOCTYPE html>
<html>

<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="renderer" content="webkit" />
  <meta name="robots" content="index, follow" />
  <title>KELLY RIGHT ™</title>
  <meta name="keywords" content="" />
  <meta name="description" content="" />
  <link rel="shortcut icon" href="skin/fonts/favicon.ico"/>
  <link rel="bookmark" href="skin/fonts/favicon.ico"/>
  <link rel="stylesheet" type="text/css" href="skin/css/font-awesome.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/bootstrap.min.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/owl.carousel.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/owl.theme.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/settings.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/style-red.css" media="screen" />
  <link rel="stylesheet" type="text/css" href="skin/css/tk.css" media="screen" />
  <script type="text/javascript" src="skin/js/jquery.min.js"></script>
  <script type="text/javascript" src="skin/js/bootstrap.min.js"></script>
  <script type="text/javascript" src="skin/js/owl.carousel.min.js"></script>
</head>

<body>
  <div id="container" class="forget">
    <!-- 导航栏 -->
    <header class="clearfix" id="header-sec">
      <nav class="navbar navbar-default navbar-fixed-top pbox" role="navigation">

        <div class="container-fluid">

          <!-- 左 logo -->
          <div class="navbar-header">
            <!-- 移动端按钮 -->
            <a class="navbar-toggle collapsed mmenu-btn" href="#mmenu">
              <!-- <span class="sr-only">Toggle navigation</span>
                  <span class="icon-bar"></span> 
                  <span class="icon-bar"></span> 
                  <span class="icon-bar"></span>  -->
              <img src="./skin/images/mobile-qttab.png" alt="">
            </a>

            <!-- pc -->
            <a class="navbar-brand hidden-xs hidden-sm hiddenMobEle" href="javascript:;">
              <img src="./skin/images/logo.png" alt="" class="logo" />
            </a>

            <!-- 移动 -->
            <a class="navbar-brand hidden-md hidden-lg hiddenPccEle" href="javascript:;">
              <img src="./skin/images/log-logo.png" alt="" class="logo" />
            </a>
            
          </div>

          <!-- tab -->
          <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">

            <ul class="nav navbar-nav navbar-left" id="navigation1">
              <li class="Lev1">
                <a href="./index.html" class='menu1 active'>Homes for Sale </a>
              </li>

              <li class="Lev1">
                <a href="./aboutCharlotte.html" class='menu1'>About Charlotte</a>
              </li>

              <li class="Lev1">
                <a href="./contactUs.html" class='menu1'>Contact Us</a>
              </li>

              <!-- <li class="Lev1">
                    <a href="./openHouses.html" class="menu1">Open Houses</a>
                  </li> -->

              <!-- <li class="Lev1">
                    <a href="javascript:void(0);" class="menu1">New Developments</a>
                  </li>
    
                  <li class="Lev1">
                    <a href="javascript:void(0);" class="menu1">Buildings
                    </a>
    
                  </li>
    
                  <li class="Lev1">
                    <a href="javascript:void(0);" class="menu1">Find an Agent
                    </a>
    
                  </li>
    
                  <li class="Lev1">
                    <a href="javascript:void(0);" class="menu1">Blog
                    </a>
                  </li> -->
            </ul>

            <ul class="nav navbar-nav navbar-right" id="navigation2">

              <li class="Lev1">
                <a href="./sign-up.html" class="menu1 giwid">SIGN UP</a>
              </li>

              <li class="Lev1">
                <a href="javascript:void(0);" class="menu1 giwid activeLogin">LOG IN</a>
              </li>

              <li class="afterLogin" style="display: none">
                <a class="ele-a" href="#">
                  <!-- 注册时输入的用户名 -->
                  <span class="atext">username</span>
                  <div class="arr-down">
                    <img src="./skin/images/jiantouxia.png" alt="">
                  </div>
                </a>

                <!-- 用户相关 -->
                <ul class="aboutUser">
                  <li class="item">
                    <a href="./account-details.html" class="in">
                      <span class="">Account Details</span>
                    </a>
                  </li>

                  <li class="item" id="userFavourite">
                    <a href="./collection.html" class="in">
                      <span class="">Favorites</span>
                      <span class="favNum">0</span>
                    </a>
                  </li>

                  <li class="item">
                    <p class="signOut">Sign Out</p>
                  </li>
                </ul>

              </li>

            </ul>

          </div>

        </div>

      </nav>
    </header>

    <!-- sign in -->
    <div class="signin none">
      <div class="content">
        <!-- 关闭 -->
        <div class="closebtn"></div>

        <!-- logo -->
        <div class="dllogos">
          <div class="photo">
            <img src="./skin/images/log-logo.png" class="thepicture" alt="">
          </div>
        </div>

        <!-- 提示登录 -->
        <!-- <div class="tsinfo">Please login to your account before seeing the information. </div> -->

        <!-- 用户 -->
        <div class="userinfo login-normal" id="userInfo">
          <form action="">
            <!-- 导航 -->
            <div class="row navbares" id="signNav">

              <div class="col-xs-4 col-xs-offset-4 col-sm-2 col-sm-offset-7 up">
                <span>Sign Up</span>
              </div>

              <div class="col-xs-4 col-sm-2 log active">
                <span>Log In</span>
              </div>

            </div>

            <!-- sign up -->
            <div class="row usersignup">
              <!-- <div class="row free">
                Create a FREE account to save searches and track your favourite homes. Already have an account? Click
                the Log In tab.
              </div> -->

              <!-- 提示 -->
              <div class="row upalert" id="upginTips">You have signed up successfully, please log in to account.</div>

              <div class="row name">
                <div class="title">Name</div>
                <input type="text" placeholder="" name="" id="input_name1">
                <div class="ts">cannot be blank</div>
              </div>

              <div class="row email">
                <div class="title">Email</div>
                <input type="email" placeholder="" name="" id="input_email1">
                <div class="ts">please enter the correct email</div>
                <div class="exist">account already exists</div>
              </div>

              <div class="row password">
                <div class="title">Phone Number <span class="usedfor">(Used for Password)</span></div>
                <input type="text" placeholder="" name="" id="input_password1">
                <div class="ts">cannot be blank</div>
              </div>

              <!-- <div class="row confirm">
                <div class="title">Confirm Password</div>
                <input type="password" placeholder="" name="" id="input_confirm1">
                <div class="ts">does not match password</div>
              </div> -->

              <!-- 确定 -->
              <div class="row upsubmit">
                <p class="tj active">Sign Up</p>
              </div>

              <div class="row confirm2">
                <!-- <input type="checkbox" name="" value="0" id=""> -->
                <div class="pictur active"></div>
                Get emailed when we find more properties that suit your tastes! We'll notify you daily of new listings
                &
                price changes.
              </div>

              <div class="row bottomTiS">
                By clicking continue or sign up, you agree to our linked <span class="hs">Terms of Use</span> and <span
                  class="hs">Privacy Policy</span>
              </div>
            </div>

            <!-- log in -->
            <div class="row usersignin">
              <!-- <div class="row tit">
                <p>
                  Don't have an account? Click on the Sign Up tab.
                </p>
              </div> -->

              <!-- 提示 -->
              <div class="row alert" id="loginTips">Invalid email or password.</div>

              <div class="row email">
                <div class="title">Email</div>
                <input type="email" name="" placeholder="" id="input_email">
                <div class="ts">Please enter the correct email</div>
              </div>

              <div class="row password">
                <div class="title">Phone Number <span class="usedfor">(Used for Password)</span></div>
                <input type="text" name="" placeholder="" id="input_password">
                <div class="ts">cannot be blank</div>
              </div>

              <div class="row loginsubmits">
                <p class="tj active">Log In</p>
              </div>

              <!-- 是否保持状态 忘记密码 -->
              <div class="row combine">
                <!-- 保持状态 -->
                <div class="col-xs-12 col-sm-6 rad">
                  <!-- <input type="checkbox" value="0" name="agree" id="check"> -->
                  <div class="pictur active"></div>
                  Stay logged in
                </div>

                <div class="col-xs-12 col-sm-6 access">
                  <p>
                    <a href="javascript: void(0);" id="forgetword">Can't access your account?</a>
                  </p>
                </div>

              </div>


            </div>

          </form>

        </div>

        <!-- 忘记密码 -->
        <div class="row findpassword login-find" style="display: none;">
          <div class="row tit">
            <p>
              Enter the email address you registered with and your password will be sent to you.
            </p>
          </div>

          <!-- 提示 -->
          <div class="row alert" id="findpaTips">Invalid email.</div>

          <div class="row email" id="emaFi">
            <div class="title">Email</div>
            <input type="email" name="" placeholder="" id="sendEmail">
            <div class="ts">Please enter the correct email.</div>
          </div>

          <div class="row send" id="sendPass">
            <p class="tj active">Send Password</p>
          </div>

          <div class="row back">
            <p>
              <a href="javascript: void(0);">Back to log in page</a>
            </p>
          </div>

        </div>

      </div>
    </div>

    <!-- 内容 -->
    <div class="page-container" id="innerpage-wrap">
      <div class="container">
        <div class="row mrow">
          <!-- 标题 -->
          <h1 class="tit">Change your password</h1>
          <hr class="divider--hr">

          <div class="row main">

            <!-- 右 表单 -->
            <div class="col-xs-12 col-md-6 col-md-offset-3 r-main">
              <div class="row signu" id="formboxs">
                <form action="">
                  <!-- 提示 -->
                  <div class="row mainrbox" id="rboxs">Your password was changed successfully. please log in to account.</div>

                  <div class="row password">
                    <div class="title">Phone Number <span class="usedfor">(Used for Password)</span></div>
                    <input type="password" placeholder="" name="" id="input_password2">
                    <div class="ts">cannot be blank</div>
                  </div>

                  <div class="row confirm">
                    <div class="title">Phone Number Confirmation</div>
                    <input type="password" placeholder="" name="" id="input_confirm2">
                    <div class="ts">does not match password</div>
                  </div>

                  <div class="row" id="saveChange">
                    <p class="tj">Change my password</p>
                  </div>

                </form>
              </div>

            </div>
          </div>

        </div>

      </div>
    </div>

    <!-- 加载中 -->
    <div class="load">
      <div class="ing">
        <img src="./skin/images/jiazaizhong.gif" class="photo" alt="">
      </div>
    </div>

    <!-- 底部 -->
    <div class="commonfoot">
      <div class="container  hidden-xs hidden-sm">

        <div class="row">

          <div class="col-md-4 col-lg-4  foot-contact rightbox">
            <div class="f-contact ltxt">
              <p> <a href="javascript:void(0);">© 2019 Real Estate Website by DotCom Agents</a></p>
              <p> <a href="javascript:void(0);">All rights reserved. Privacy and Terms</a></p>
            </div>
          </div>

          <div class="col-md-4 col-lg-4 foot-contact">
            <div class="f-contact">
              <ul class="box clearfix">
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom1.png" alt="" class="pic">
                  </a>
                </li>
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom2.png" alt="" class="pic">
                  </a>
                </li>
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom3.png" alt="" class="pic">
                  </a>
                </li>
              </ul>
            </div>
          </div>

          <div class="col-md-4 col-lg-4 foot-contact">
            <div class="f-contact rtxt">
              <p> <a href="./aboutCharlotte.html">ABOUT US</a></p>
              <p> <a href="./contactUs.html">CONTACT US</a></p>
            </div>
          </div>

        </div>

      </div>

      <div class="container hidden-md  hidden-lg">

        <div class="row">

          <div class="col-xs-12 col-sm-12 foot-contact">
            <div class="f-contact one">
              <ul class="about clearfix">
                <li><a href="./aboutCharlotte.html">ABOUT US</a></li>
                <li><a href="./contactUs.html">CONTACT US</a></li>
              </ul>
            </div>
          </div>

          <div class="col-xs-12 col-sm-12 foot-contact">
            <div class="f-contact two">
              <ul class="box clearfix">
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom1.png" alt="" class="pic">
                  </a>
                </li>
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom2.png" alt="" class="pic">
                  </a>
                </li>
                <li>
                  <a href="javascript:void(0);">
                    <img src="./skin/images/bottom3.png" alt="" class="pic">
                  </a>
                </li>
              </ul>
            </div>
          </div>

          <div class="col-xs-12 col-sm-12  foot-contact">
            <div class="f-contact three">
              <p> <a href="javascript:void(0);">© 2019 Real Estate Website by DotCom Agents</a></p>
              <p> <a href="javascript:void(0);">All rights reserved. Privacy and Terms</a></p>
            </div>
          </div>
        </div>

      </div>
    </div>

    <!-- 提示: 到邮箱找回密码 -->
    <div class="findmailbox">
      <img class="pic" src="./skin/images/dui.png" alt="">
      <span class="txt">You will receive an email with instructions about how to reset your password in a few
        minutes.</span>
      <div class="close">
        <img src="./skin/images/guanbi.png" alt="">
      </div>
    </div>


  </div>
  <script type="text/javascript" src="skin/js/jquery.migrate.js"></script>
  <!--<script type="text/javascript" src="skin/js/jquery.bxslider.min.js"></script>-->
  <script type="text/javascript" src="skin/js/jquery.imagesloaded.min.js"></script>
  <!-- <script type="text/javascript" src="skin/js/retina-1.1.0.min.js"></script> -->
  <script type="text/javascript" src="skin/js/jquery.themepunch.tools.min.js"></script>
  <script type="text/javascript" src="skin/js/jquery.themepunch.revolution.min.js"></script>
  <script type="text/javascript" src="skin/js/base64.min.js"></script>
  <script type="text/javascript" src="skin/js/base.js"></script>
  <script type="text/javascript" src="skin/js/axios.min.js"></script>
  <script type="text/javascript" src="skin/js/script.js"></script>

  <!-- 移动端导航 -->
  <nav id="mmenu" class="noDis">
    <div class="mmDiv">

      <!-- 关闭 -->
      <div class="closefixed closemenu">
        <img src="./skin/images/close_pic.png" alt="" style="width: 20px; height: 20px;">
      </div>

      <!-- sign log -->
      <div class="MMhead">
        <ul class="users clearfix">
          <!-- 登录前 -->
          <li class="before before1">
            <a href="./sign-up.html" class="noblock logins">Sign Up</a>
          </li>

          <li class="before">
            <a href="javascript:;" class="noblock activeLogin">Log In</a>
          </li>

          <!-- 登录后 -->
          <!-- Account Details -->
          <li class="afters afters1">
            <a href="./account-details.html" class="item account">
              <img src="./skin/images/log-ren.png" class="pic" alt="">
            </a>
          </li>

          <!-- Favourites -->
          <li class="afters">
            <a href="./collection.html" class="item account">
              <img src="./skin/images/log-aixin.png" class="pic" alt="">
              <span class="num" id="faNum">0</span>
            </a>
          </li>

        </ul>

      </div>


      <!-- nav -->
      <ul class="mobnavbar">
        <li class="box">
          <a href="./index.html">Homes for Sale</a>
        </li>

        <li class="box">
          <a href="./aboutCharlotte.html">About Charlotte</a>
        </li>

        <li class="box">
          <a href="./contactUs.html">Contact Us</a>
        </li>

        <!-- <li class="box">
            <a href="./openHouses.html" class="m-menu1">Open Houses</a>
          </li> -->

        <!-- <li class="box">
            <a href="javascript:;" class="m-menu1">New Developments</a>
          </li>
  
          <li class="box">
            <a href="" class="m-menu1">Buildings</a>
          </li>
  
          <li class="box">
            <a href="" class="m-menu1">Find an Agent</a>
          </li>
          
          <li class="box">
            <a href="" class="m-menu1">Find an Agent</a>
          </li>
  
          <li class="box">
            <a href="javascript:;" class="m-menu1">Blog</a>
          </li> -->
      </ul>

      <!-- sign out 登录后出现 -->
      <div class="footout">
        <a class="" href="javascript:;">Sign Out</a>
      </div>

    </div>
  </nav>

  <link type="text/css" rel="stylesheet" href="skin/css/jquery.mmenu.all.css" />
  <script type="text/javascript" src="skin/js/jquery.mmenu.all.min.js"></script>
  <script type="text/javascript">
    $(function ($) {
      var baseUrl = localStorage.getItem('baseUrl');
      // 获取当前地址
      var projectUrl = '';
      ;(function getUrl () {
        var currUrl = window.location.href;
        var idx = currUrl.lastIndexOf('/') + 1;
        var c = currUrl.substr(0, idx);
        projectUrl = c;
      })();

      // 1 loading
      function loading () {
        $('.load').show();
        setTimeout(()=>{
          $('.load').hide();
        }, 500)
      }
      
      // 2 获取参数
      function getUrlParam(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
        var r = window.location.search.substr(1).match(reg);
        if (r != null) return unescape(r[2]);
        return null;
      }

      var p = getUrlParam('p');


      // 3.1 Change my password   
      $('.forget').on('click', '#saveChange', function () {
        // 校验
        var password = $('.forget #formboxs .password #input_password2').val();
        var confirm = $('.forget #formboxs .confirm #input_confirm2').val();

        if (!password) {
          $('.forget #formboxs .password .ts').show();
          return;
        }

        if (!confirm) {
          $('.forget #formboxs .confirm .ts').show().text('cannot be blank');
          return;
        } else {

          // 和密码一样吗
          if(password != confirm) {
            $('.forget #formboxs .confirm .ts').show().text('does not match password');
            return;
          } else {
            $('.forget #formboxs .confirm .ts').hide();
          }

        }

        // 请求--重置密码
        axios.post(baseUrl + '/app/resetPassword', {'newPwd': password},
          {
            headers: {
            'token': p
            }
          }
          )

          .then(function (res) {
            // 1 重置成功
            if(res.data.code == 0) {
              console.log('-----重置成功-----', res);

              loading();
              setTimeout(()=>{
                $('.forget #formboxs #rboxs').show().text('Your password was changed successfully. please log in to account.');
              }, 100)

              // 回首页
              setTimeout(()=>{
                window.location.href = projectUrl + 'index.html';
              }, 1500);

            } else {

              console.log('-----重置失败-----', res);
              // 提示
              res.data.msg && $('.forget #formboxs #rboxs').show().text(res.data.msg);
            }

          })

          .catch(function (res) {
            console.log('-----请求注册失败-----', res);
            // 提示
            res.data.msg && $('.forget #formboxs #rboxs').show().text(res.data.msg);
          });


      })

      // 3.2 password-focus
      $('#formboxs .password #input_password2').focus(function () {
        $('#formboxs .password .ts').hide();
      })
    
      // 3.3 password-focus
      $('#formboxs .confirm #input_confirm2').focus(function () {
        $('#formboxs .confirm .ts').hide();
      })



    });
  </script>
</body>

</html>